package com.sky.mapper.admin;

import com.sky.vo.DishOverViewVO;
import com.sky.vo.OrderDayAmountVO;
import com.sky.vo.SetmealOverViewVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface WorkSpaceMapper {
    /**
     * 获取营业额数据
     * @param begin
     * @param end
     * @return
     */
    List<OrderDayAmountVO> getOrderAmount(String begin,String end );

    /**
     * 获取新增用户数量
     * @param now
     * @return
     */
    @Select("select count(*) from user where create_time>#{now}")
    Integer getNewUserCount(LocalDate now);

    /**
     * 菜品总览
     * @return
     */
    DishOverViewVO overviewDishes();

    /**
     * 套餐总览
     * @return
     */
    SetmealOverViewVO overviewSetmeals();

}
